package com.peach.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class User {
    private Integer userId;
    private String userName;
    private String userClass;

    /*一对一*/
    private UserBranch userBranch;//支部
    private UserStage userStage;//状态

    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date userActivistDate;
    private Date userDevelopmentDate;
    private Date userProbationaryDate;
    @Value("无")
    private Date userFormDate;
    private String userPwd;

    private List<Activity> activities;

    public User(Integer userId, String userName, String userClass, UserBranch userBranch, UserStage userStage, Date userActivistDate, Date userDevelopmentDate, Date userProbationaryDate, Date userFormDate, String userPwd) {
        this.userId = userId;
        this.userName = userName;
        this.userClass = userClass;
        this.userBranch = userBranch;
        this.userStage = userStage;
        this.userActivistDate = userActivistDate;
        this.userDevelopmentDate = userDevelopmentDate;
        this.userProbationaryDate = userProbationaryDate;
        this.userFormDate = userFormDate;
        this.userPwd = userPwd;
    }
}
